package com.halflife.comeElectricity.member.merchant;

import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

@Repository
public interface MerchantRepository {
    int deleteByPrimaryKey(Integer id);

    int insert(Merchant record);

    int insertSelective(Merchant record);

    Merchant selectByPrimaryKey(Integer id);

    Merchant selectByUnionId(String unionId);

    int updateByPrimaryKeySelective(Merchant record);

    int updateByPrimaryKey(Merchant record);

    List<Merchant> findListByParam(Merchant param);

    /**
     * 查询所有商户
     * @param record
     * @return
     */
    List<Merchant> selectMerchantByParam(HashMap<String, Object> param);
    List<Merchant> selectMerchantByPage(HashMap<String, Object> param);

    /**
     *  查询商户数量
     * @param record
     * @return
     */
    int selectMerchantCountOrderByPage(HashMap<String, Object> param);
}